class Solution {
    public char findTheDifference(String s, String t) {
        char res = 0;
        char[] c1 = s.toCharArray();
        char[] c2 = t.toCharArray();
        for (char c : c1) {
            res = (char) (res ^ c);
        }
        for (char c : c2) {
            res = (char) (res ^ c);
        }
        return res;
    }
}
